#pragma once
#include "../ar8030_usb_test_tool/ar8030_com.h"
#include <string>

enum part_status {
    PART_STATUS_NOCHANGE = 0,
    PART_STATUS_CHANGE,
    PART_STATUS_UNKNOWN
};


struct img8030 {
    struct upgrade_hdr*  hdr;
    unsigned char*       hdr_ext;
    unsigned char*       romcode;
    unsigned char*       bootloader;
    unsigned char*       gpt;
    struct part_info*    partitions;
    struct segment_info* segments;
    char*                img;

    int dump_upgrade_file();

    img8030(std::string path);

    ~img8030() {
        if(img) {
            delete [] img;
        }
    }
};

